<template>
    <view class="page">
        <view>
            <picker  mode="selector" :range="subjectList" @change=subListChange">
        </view>
        <view>
            <picker node="date" @change="dateChange">
        </view>

        <view>
            <view @click="select(item)" v-for="(item,index) in periodrecordList " :index:"index">
                <view>{{item.date}}</view>
                <view>{{item.teacher}}</view>
                <view class="uni-flex uni-row" jstuy-content="space-between">
                    <view>{{item.classname}}</view>
                    <checkbox></checkbox>
                </view>
            </view>


        </view>









    </view>
</template>

<script>
	import pageHead from '../../../components/page-head.vue'
    import { mapState,mapMutations } from 'vuex'

    export default {
        data(){ 
            return {
                formdata:{  
                        subid:null,
                },
                periodrecordList:[]

            }

        },
        computed: {
               …mapState([’subjectList'])
          },
        methods: {
           async initData:function(){
                const res=await queryperiodrecord(formdata);
                if(res.success==true){

                }else {

                }

            },
            select:function(item){
            uni.showModal({title:"提示",success:function(res){
    if(res.confirm){
        confirmmake(this.formdata);



    }else if(res.cancel){
    
    }
    
}})

            },
            async   confirmmake:function(){
                const res= await makemissing(formdata);
                if(res.success==true){

                }
                else {

                }


            }

            subListChange: function(item){
            this.formdata.subid=item.id;


            }
            
            

        }
    }
</script>

<style>
    @import "../../../common/uni.css";
</style>
